package com.epalmpay.service.profitmanage;

import com.epalmpay.exception.ApplicationException;
import com.epalmpay.dto.profitmanage.*;
import com.epalmpay.dto.system.BaseOutDTO;
import com.epalmpay.dto.yunliu.profit.*;
import com.epalmpay.entity.*;
import com.epalmpay.entity.profit.ProfitAgentMonth;
import com.epalmpay.entity.profit.ProfitMemberMonth;
import com.epalmpay.entity.profit.ProfitShopMonth;



/**
 * Created by wzq on 2017/6/2.
 */
public interface IProfitManageService {
    
    public ProfitListOutDTO getProfitList(ProfitInDTO profitInDTO,Page page) throws Exception;
    public ProfitListOutDTO getGroupStatis(ProfitInDTO profitInDTO) throws Exception;
    public ProfitAgentMonthDetailDTO toAgentProfitMonthDetailPage(ProfitInDTO profitInDTO) throws Exception;
    public ProfitListOutDTO getAgentProfitMonthByYear(ProfitInDTO profitInDTO) throws Exception;
    public ProfitAgentMonthDetailDTO toGroupProfitMonthDetailPage(ProfitInDTO profitInDTO) throws Exception;
    //代理分润金额确认
    public BaseOutDTO updateConfirmProfitAmount(ProfitInDTO profitInDTO) throws Exception;

    //代理分润金额修改
    public int updateProfitAmount(ProfitAgentMonth profitAgentMonth) throws Exception;
    //门店分润金额修改
    public int updateShopProfitAmount(ProfitShopMonth profitShopMonth) throws Exception;
    public ProfitShopMonthDetailDTO  toShopProfitMonthDetailPage(ProfitInDTO profitInDTO) throws Exception;
    //门店分润金额确认
    public BaseOutDTO updateConfirmShopProfitAmount(ProfitInDTO profitInDTO) throws Exception;
    public int updateAgentProfitOutMoney(ProfitAgentMonth profitAgentMonth, Long loginId) throws Exception;
    public int updateShopProfitOutMoney(ProfitShopMonth profitshopMonth, Long loginId) throws Exception;
    public int updateMemberProfitOutMoney(ProfitMemberMonth record, Long loginId) throws Exception;
    public ProfitTradeDayDetailDTO toProfitAgentShopTradeDayDetailList(ProfitInDTO profitInDTO) throws Exception;
    public ProfitOtherDayDetailDTO toProfitAgentShopOtherDayDetailList(ProfitInDTO profitInDTO) throws Exception;
    public ProfitTradeDayDetailDTO toProfitShopTradeDayDetailList(ProfitInDTO profitInDTO) throws Exception;
    public ProfitOtherDayDetailDTO toProfitShopOtherDayDetailList(ProfitInDTO profitInDTO) throws Exception;
    public ProfitTradeDayDetailDTO toProfitGroupShopTradeDayDetailList(ProfitInDTO profitInDTO) throws Exception;
    public ProfitOtherDayDetailDTO toProfitGroupShopOtherDayDetailList(ProfitInDTO profitInDTO) throws Exception;


    PolicyProfitRuleOutDTO GetPolicyProfitRule(YsPolicyProfitRule YsPolicyProfitRule)throws ApplicationException;

    PolicyProfitRuleOutDTO SetPolicyProfitRule(YsPolicyProfitRule ysObdProfitRule)throws ApplicationException;

    OpenCreditCardProfitRuleOutDTO GetOpenCreditCardRule(YsOpenCreditProfitRule YsOpenCreditProfitRule)throws ApplicationException;

    OpenCreditCardProfitRuleOutDTO SetOpenCreditCardRule(YsOpenCreditProfitRule YsOpenCreditProfitRule)throws ApplicationException;

    //obd分润计算处理
    public int insertObdProfitCalculate(Long memberId,YsObd ysObd) throws Exception;

    //CreditCardOpenCard分润计算处理
    public int insertCreditOpenCardProfitCalculate(String idNo,String creditCardNo) throws Exception;

    //保单分润计算处理
    public int insertPolicyProfitCalculate(String policyId,String thirdUserId,Integer orderAmount,String areaCode,
                                     String areaName,String idNo,String confirmTime,Integer policyStatus) throws Exception;

    PolicyProfitListOutDTO getPolicyList(YsPolicyProfitRule ysPolicyProfitRule) throws ApplicationException;

    PolicyProfitRuleOutDTO deletePolicyProfitRule(YsPolicyProfitRule ysPolicyProfitRule)throws ApplicationException;

    CreditCardOpenCardListOutDTO getCreditCardOpenCardList(YsOpenCreditProfitRule ysOpenCreditProfitRule)throws ApplicationException;

    OpenCreditCardProfitRuleOutDTO deleteCreditCardOpenCardProfitRule(YsOpenCreditProfitRule ysOpenCreditProfitRule)throws ApplicationException;

    PolicyProfitRuleOutDTO deletePolicyProfitCity(YsPolicyProfitCity ysPolicyProfitCity)throws ApplicationException;

    PolicyProfitRuleOutDTO SetPolicyProfitCity(YsPolicyProfitCity ysObdProfitCity)throws ApplicationException;


    YsCityListOutDTO queryYsCityList(YsCity ysCity)throws ApplicationException;

    int addCityToPolicyList(YsCity ysCity)throws ApplicationException;
}
